package com.caigou.service;

import com.caigou.bean.cms.entity.Video;
import com.caigou.bean.cms.entity.VideoFolder;
import com.caigou.bean.cms.param.*;
import com.caigou.bean.exam.entity.Users;
import com.caigou.util.Result;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface VideoService {
    /************************ VideoFolder interface *********************/
    VideoFolder getRootVideoFolder();

    Result createVideoFolder(Integer superId, String folderName, String userId);

    int saveVideoFolder(VideoFolder videoFolder);

    List<VideoFolder> listVideoFolderBySuperId(Integer superId);

    Result uploadVideo(MultipartFile[] files, String[] videoNotes, String[] videoImages, Integer folderId, String videoSource, String videoEditor, String userId);

    Result deleteVideoFolder(Integer id);

    /************************ Video interface *********************/
    int saveVideo(Video video);

    PageInfo<Video> queryVideoIncludingSubfolders(Integer folderId, String keyword, Integer pageNum, Integer pageSize);

    PageInfo<Video> queryVideoIncludingSubfolders(VideoQueryParam videoQueryParam, Users user);

    Result updateVideo(VideoParam param, Users user);

    Result updateVideoName(Integer id, String newVideoName, String userId);

    Result deleteVideo(Integer id);

    Result deleteVideo2Recycle(Integer id);

    Result deleteVideo2Recycle(Integer[] ids);


//    Result updateVideoIsUse(Integer id, Integer newVideoIsUse, String userId);

    Result getVideoTotalSize();

    Result updateVideoDefaultFolder(VideoFolderParam videoFolderParam);

    Result useVideo(VideoUseParam videoUseParam);

    Result moveVideo(Integer[] ids, Integer targetFolderId);

    int moveVideo(Integer id, Integer targetFolderId);

    PageInfo<Video> queryVideoInRecycle(VideoRecycleQueryParam videoRecycleQueryParam);

    Result restoreVideo(Integer[] ids);

    Result restoreVideo(Integer id);

    Result deleteVideoFromRecycle(Integer[] ids);

    Result deleteVideoFromRecycle(Integer id);

    Result clearRecycle();
}
